function postComment (relId, typeName, id) {
	var oText = $('#comment_text_' + relId);
	var commentText = oText.val();
	
	if (commentText == '') {
		$('#commenting_error_' + relId).show();
		return false;
	}
		
	$.ajax ({
		url:  baseURI + '/mail/ajax_addcomment/' + id,
		data: 'data[new][text]=' + Url.encode(commentText) + '&data[new][rel_id]=' + relId,
		type: 'POST',
		dataType: 'xml',
		error: function () { new Error ('Произошла ошибка!'); },
		success: function (xml) {
			var result = $(xml).find('result').text();
			
			if (result == '0') {
				new Error ('Произошла ошибка!');
			}
			else if (result == '1') {
				$('#comments_div').load ( baseURI + '/mail/getcomments/' + id + '?reload');
			}
		}
	});
}